<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bai 2.1</title>
</head>

<body>
<?php
	if(isset($_POST["txtnoiDung"])&&isset($_POST["txtmauNen"])&&isset($_POST["txtmauChu"]))
	{
		$noiDung=$_POST["txtnoiDung"];
		$mauNen=$_POST["txtmauNen"];
		$mauChu=$_POST["txtmauChu"];		
		$ketqua="<tr style='text-align:center;background-color:#$mauNen; color:#$mauChu;'><td colspan='2'>$noiDung</td></tr>";
	}
?>
<form action="Bai2_1.php" method="post" name="form1"><table width="450" border="1" align="center" cellpadding="1" cellspacing="1">
  <tr>
    <td colspan="2" bgcolor="#FF0000" style="font-family: 'Lucida Console', Monaco, monospace; text-align: center; color: #FFF;">ĐỊNH MÀU CHỮ - MÀU NỀN</td>
  </tr>
  <tr bgcolor="#FFCCFF">
    <td nowrap="nowrap">Nội dung:</td>
    <td nowrap="nowrap"><input name="txtnoiDung" type="text" id="txtnoiDung" value="<?php echo $noiDung;?>" size="50" /></td>
  </tr>
  <tr bgcolor="#FFCCFF">
    <td nowrap="nowrap">Màu nền:</td>
    <td nowrap="nowrap"><input name="txtmauNen" type="text" id="txtmauNen" value="<?php echo $mauNen;?>" size="30" /></td>
  </tr>
  <tr bgcolor="#FFCCFF">
    <td nowrap="nowrap" bgcolor="#FFCCFF">Màu chữ:</td>
    <td nowrap="nowrap"><input name="txtmauChu" type="text" id="txtmauChu" value="<?php echo $mauChu;?>" size="30" /></td>
  </tr>
  <tr bgcolor="#FFCCFF" align="center">
    <td colspan="2"><input style="background-color:#F90;" type="submit" value="Xem kết quả" name="btnXemKQ"/></td>
  </tr>  
  <?php echo $ketqua;?>    
</table></form>
</body>
</html>